-
Notifications
You must be signed in to change notification settings - Fork 94
OpenAI agents #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenAI agents #195
Conversation
* Bump gevent
…188) * Added langchain tracing interceptor. Changed sample to use a child workflow and multiple activities.
Converted activities in hello samples from async to sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I know some samples don't and we've been burned by this in the past, is there any way for us to add any kind of tests? The testing story with the OpenAI agents is a bit rough I understand, and can also understand if it should be a separate issue because it requires design/thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see integration tests. Unit tests would basically just duplicate what's in the Python SDK.
I've been testing manually and it's getting old.
openai_agents/README.md
Outdated
|
|
||
| These samples are adapted from the code in the OpenAI Agents SDK: | ||
|
|
||
| https://github.com/openai/openai-agents-python/tree/main/examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pedantic, but wonder if we want to link a certain tag here instead of main if users want to compare with the exact version we took them from (especially as they diverge in the future)
| ### TOOLS | ||
|
|
||
|
|
||
| @function_tool( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is mimicking an OpenAI sample it may be fine, but in general with newer samples, we're trying not to put non-deterministic things like activities inside of workflow files. This whole set of code is reloaded every workflow run/replay which means these decorators are run every workflow run/replay. We encourage workflows to be in their own files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and split it off.
Co-authored-by: Chad Retz <chad@temporal.io>
jssmith
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've addressed most of the comments.
Remaining issues are:
- Would like to have integration tests
- May be able to to customer service example with
start_update_with_start_workflow
| ### TOOLS | ||
|
|
||
|
|
||
| @function_tool( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and split it off.
| # Query the workflow for the chat history | ||
| # If the workflow is not open, start a new one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some work on this but it's not 100% of the way there. I'm going to leave it alone for now.
Sushisource
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add tests as a follow up. It's good to have this out so people can refer to it for the recent release.
What was changed
Added samples for using Temporal with the OpenAI Agents SDK
Why?
To demonstrate how Temporal provides durable execution for applications built with the OpenAI Agents SDK
Checklist
Closes
How was this tested:
Tests derived from these samples are in the Temporal Python SDK under
tests/contrib/test_openai.pyAny docs updates needed?
No.